﻿<Page x:Class="App40.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="using:App40"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">

    <Page.DataContext>
        <local:MainPageViewModel />
    </Page.DataContext>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions>
        <ScrollViewer Grid.Column="0">
            <ItemsControl ItemsSource="{Binding ChangingTraces}" />
        </ScrollViewer>
        <ScrollViewer Grid.Column="1">
            <ItemsControl ItemsSource="{Binding ChangedTraces}" />
        </ScrollViewer>
        <ScrollViewer Grid.Column="2"
                      HorizontalScrollBarVisibility="Auto"
                      VerticalScrollMode="Disabled"
                      ViewChanging="ScrollViewer_ViewChanging"
                      ViewChanged="ScrollViewer_ViewChanged">
            <ItemsControl ItemsSource="{Binding Items}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Rectangle Width="400"
                                   Margin="10,0"
                                   Fill="CornflowerBlue" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
    </Grid>
</Page>
